package com.orange.common.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class StringUtil
{
  public static Date dateFromStringByFormat(String paramString1, String paramString2)
  {
    Object localObject;
    if ((paramString1 == null) || (paramString1.length() == 0) || (paramString2 == null))
    {
      localObject = null;
      return localObject;
    }
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat(paramString2);
    localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT+0800"));
    try
    {
      Date localDate = localSimpleDateFormat.parse(paramString1);
      localObject = localDate;
    }
    catch (ParseException localParseException)
    {
      localObject = null;
    }
  }

  public static boolean isEmpty(String paramString)
  {
    int i;
    if ((paramString == null) || (paramString.length() == 0))
      i = 1;
    while (true)
    {
      return i;
      i = 0;
    }
  }
}